import { withRouter, NavLink, Switch, Route } from 'react-router-dom';
import Login from './views/Login';
import Product from './views/Product';
import Service from './views/Service';
import "./App.css"
function App(props) {
  return (
    <div className="App">
      <nav>
        <ul>
          <li>
            <NavLink activeClassName='nav-active' to="/home">HOME</NavLink>
          </li>
          <li>
            <NavLink activeClassName='nav-active' to="/product">PRODUCT</NavLink>
          </li>
          <li>
            <NavLink activeClassName='nav-active' to="/service">SERVICE</NavLink>
          </li>
        </ul>
      </nav>
      <Switch>
        <Route path="/" exact component={Login}></Route>
        <Route path="/home" component={Login}></Route>
        <Route path="/product" component={Product}></Route>
        <Route path="/service" component={Service}></Route>
        {/* 404 */}
      </Switch>
    </div>
  );
}

export default withRouter(App);